#                                               -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_PREREQ(2.61)
AC_INIT(Timberyard, 0.01dev01, timberyard@grid-zero.net)
AC_CONFIG_SRCDIR([src/daemon/timberyard.cc])
AC_CONFIG_AUX_DIR(autotools)
AM_INIT_AUTOMAKE(dist-bzip2)
AM_CONFIG_HEADER([src/daemon/config.h])

AC_DEFINE_DIR(MODULEBASEDIR,{libdir}/${PACKAGE},Where our Modules are loaded from)

AC_ARG_ENABLE([debug], [  --enable-debug    Turn on debugging], 
	[case "${enableval}" in
		yes) debug=true ;;
		no)  debug=false ;;
		*) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
	esac],[debug=false])

AM_CONDITIONAL([DEBUG], [test x$debug = xtrue])

# Checks for programs.
AC_PROG_CXX
AC_LANG([C++])
AC_LIBTOOL_DLOPEN 
AM_PROG_LIBTOOL
AC_CXX_NAMESPACES
#AX_DIST_RPM([aux/spec.tmlp])

# Checks for libraries.
AX_LIB_POSTGRESQL()
AC_CXX_HAVE_STL 
AX_BOOST_THREAD 

# Checks for header files.
AC_CHECK_HEADER([tr1/functional])

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

AC_CONFIG_FILES([
	Makefile
	include/Makefile
	web/Makefile
	src/Makefile
	src/daemon/Makefile
	src/modules/Makefile
	src/lib/Makefile
])

AC_OUTPUT
